@import "settings";
@import "foundation.scss";

$vimcasts-blue: #050f47;

header {
  @include grid-row;

  .logo  { @include grid-column($columns:3, $center:true); }
  padding-bottom: em-calc(10px);

}

// body.proof {
//   .row {
//     background-image: url('/images/grid-960.png');
//     background-size: 100%;
//   }
// }

.nobr { white-space: nowrap; }

.main-content {
  @include grid-row;

  aside  {
    @include grid-column($columns:6);
    // @media #{$medium-up} {
    //   @include grid-column($columns:3);
    // }
  }

  article  {
    @include grid-column($columns:6);
    // @media #{$medium-up} {
    //   @include grid-column($columns:8, $offset: 1);
    // }
  }

}

#logo {
  padding-left: 0;
  min-width: 180px;
  h1 {
    display: inline-block;
    position: relative;
    width: 100%;
    &:before {
      // set height to be 50% of width
      // http://stackoverflow.com/a/6615994/128850
      margin-top: 50%;
      content: '';
      display: block;
    }
  }
  a, span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    background-image: url(/images/vimcasts-logo.svg);
    background-repeat: no-repeat;
    background-size: 77.5%;
    background-position: -2px 0;

    text-indent: 500%;
    white-space: nowrap;
    overflow: hidden;
  }

}

.identity-row {
  margin-top: 1em;
  margin-bottom: 1em;
}

@media #{$small-only} {
  .latest-content hr {
    display: none;
  }
}

.announcement-banner .show-for-medium-up .button {
  margin-bottom: 0;
}
.book-drew-neil .button {
  margin-bottom: 0;
}

.top-bar-underlay {
  width: 100%;
  height: 45px;
  background-color: $topbar-bg;
  position: absolute;
}

.buy-practical-vim-now {
  margin-left: auto;
  margin-right: auto;
}

.buy-videos-from-thoughtbot {
  display: block;
  width: 125px;
  margin-left: auto;
  margin-right: auto;
}

.publication {
  margin-bottom: $header-bottom-margin * 5;
}

.category-list {
  li a { display: block; }
}

.video_wrapper {
  margin-bottom: $paragraph-margin-bottom;
  display: inline-block;
  position: relative;
  width: 100%;
  max-width: 800px;
  &:before {
    margin-top: 75%;
    content: "";
    display: block;
  }
  video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
  }
}

.episode_number, time.pubdate {
  text-align: right;
  color: lighten($body-font-color, 45%);
}

a.readmore {
  float: right;
}

.blog_page section.article,
.blog_index section.article,
.categories section.article,
.categories section.screencast,
.episodes_index section.screencast,
.episodes_page section.screencast,
section.announcement {
  margin-bottom: $header-bottom-margin * 6;
  @media #{$medium-up} {
    margin-bottom: $header-bottom-margin * 10;
  }
}

section.article, section.screencast, section.transcript {
  .pubdate-row {
    &, body.index & {
      margin-bottom: $header-bottom-margin;
    }
  }
}

section.article, section.announcement {
  .title-row {
    position: relative;
    .pubdate {
      position: absolute;
      top: rem-calc(13);
      @media #{$medium-up} {
        top: rem-calc(17);
      }
    }
  }
}

section.article.detail .title-row .pubdate {
  top: rem-calc(17);
  @media #{$medium-up} {
    top: rem-calc(28);
  }
}

.episode_number small { color: lighten($body-font-color, 45%); }
h2 small { font-size: $h3-font-size; }
h3 small { font-size: $h4-font-size; }

@media #{$large-up} {
  aside.downloads, .episode_number, time.pubdate {
    text-align: right;
  }
  time.pubdate {
    color: lighten($body-font-color, 45%);
  }
}

.enlarged p {
  font-size: $h5-font-size;
  @media #{$medium-up} {
    font-size: $h4-font-size;
  }
}

aside.downloads {
}
.video-metadata {
  text-align: right;
}

@mixin header-styling {
  // Based on styles for h1, h2, h3, h4, h5, h6 defined in
  // foundation/components/_type.scss
  font-family: $header-font-family;
  font-weight: $header-font-weight;
  font-style: $header-font-style;
  color: $header-font-color;
  text-rendering: $header-text-rendering;
  margin-top: $header-top-margin;
  margin-bottom: $header-bottom-margin;
  line-height: $header-line-height;
}
.video-duration {
  @media #{$small-only} {
    font-size: $h4-font-size - rem-calc(5);
    @include header-styling;
  }
  @media #{$medium-only} {
    font-size: $h4-font-size;
    @include header-styling;
  }
  @media #{$large-only} {
    font-weight: bold;
  }
}

pre.highlight {
  margin-bottom: $paragraph-margin-bottom;
  padding: 0.75rem 1rem;
  overflow: auto;
}
code {
  color: $header-font-color;
}

// /episodes/archive
#archive {
  .episode-archive-item {
    margin-bottom: $paragraph-margin-bottom;
    a:hover {
      text-decoration: underline;
    }
    small {
      font-size: 86%;
      color: lighten($body-font-color, 45%);
    }
  }
}

.accordion {
  margin-bottom: $paragraph-margin-bottom;
  .content {
    padding-left: 0;
    padding-right: 0;
  }

  dd {
    .disclosure {
      float:right;
      opacity: 0.5;
    }
    a:hover .disclosure {
      opacity: 0.8;
    }
    & > a .disclosure:after {
      content: " \25B2 ";
    }
    &.active > a .disclosure:after {
      content: " \25BC ";
    }
  }
}

.top-bar-section ul.search-form-wrapper {
  width: 35%;
  li { width: 100%; }
}

.compact-nav {
  .tab-bar-section {
    width: 67%;
    left: initial;
  }
  form, input { margin-bottom: 0; }
  form { position: relative; }
  input {
    // Based on styles from foundation/components/_top-bar.scss
    height: auto;
    padding-top: .35rem;
    padding-bottom: .35rem;
    font-size: $topbar-button-font-size;
    font-size: rem-calc(14);
    position: relative;
    top: $topbar-button-top + 1px;
  }
}

ul.off-canvas-list ul.dropdown {
  margin-left: 0px;
  a {
    // variables from foundation/components/_offcanvas.scss
    // and foundation/components/_type.scss
    padding-left: $off-canvas-link-padding + $list-nested-margin;
  }
}

.icomoon {
  position: relative;
  padding-right: 5px;
}
.icon-play { top: 1px; }
.icon-book { top: 2px; }

// Pagination links
// Used for /episodes and /blog pagination, and
// for /results/ (search form)
.pagination-links, .st-page {
  border: 1px solid $panel-border-color;
  @include clearfix;
  .previous, .next,
  .st-prev, .st-next {
    width: 45%;
    padding: 10px 20px;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .previous,
  .st-prev { float:left; }
  .next,
  .st-next { float:right; text-align:right; }
  span.previous, span.next {
    color: $panel-border-color;
  }
}
.no-categories {
  color: lighten($body-font-color, 45%);
}
.category-aggregate-title {
  margin-bottom: $header-bottom-margin;
}

.top-bar-section li.open:not(.has-form) a:not(.button) {
  background-color: darken($primary-color, 25%);
}

.article-categories a {
  @include label(
    $text-size: rem-calc(13),
    $bg: lighten($vimcasts-blue, 80%),
    $radius:4px
  );
}

.about-mugshot {
  margin-top: $header-bottom-margin*2;
  margin-bottom: $header-bottom-margin*4;
  p {
    @media #{$medium-up} {
      text-align: right;
      position: relative;
      top: rem-calc(13);
    }
  }
}


@font-face{
	font-family: 'alt-gothic-no3';
	src: url('/fonts/AlternateGothicNo3.eot');
	src: url('/fonts/AlternateGothicNo3.eot?#iefix') format('embedded-opentype'),
	     url('/fonts/AlternateGothicNo3.woff') format('woff'),
	     url('/fonts/AlternateGothicNo3.ttf') format('truetype'),
	     url('/fonts/AlternateGothicNo3.svg#webfont') format('svg');
}

.metaheader {
  margin-top: $header-bottom-margin;
  margin-bottom: $header-bottom-margin*4;
  h2,h3{
    font-family: 'alt-gothic-no3';
    background-color: $vimcasts-blue;
    color: white;
    text-transform: uppercase;
    display: inline;
    font-size: $h4-font-size;
    white-space: nowrap;
    padding-top: 4px;
    padding-bottom: 2px;
    padding-right: 5px;
    padding-left: 15px;
    margin-left: -15px;
  }
}

.pro-content {
  margin-bottom: $header-bottom-margin*4;
  .pitch {
    font-size: $h5-font-size;
  }
}

.pro-screencasts-image, .publications-image {
  text-align: center;
  @media #{$medium-up} {
    text-align: left;
  }
}
.pro-screencasts-image img {
  max-width: 75px;
  margin-top: 20px;
  @media #{$medium-up} {
    margin-top: 75px;
  }
}
.publications-image img {
  max-width: 150px;
  .publication & {
    max-width: 300px;
  }
}
.practical-vim img {
  border: 1px solid $body-font-color;
}

body.subscribe .section {
  margin-top: $header-top-margin*8;
}

.strapline {
  margin-bottom: $header-bottom-margin*4;
  @media #{$medium-only} {
    margin-bottom: $header-bottom-margin*5;
  }
  h2, small a {
    font-family: 'alt-gothic-no3';
  }
  h2 {
    line-height: 0.8;
    font-size: $h1-font-size - rem-calc(10);
    @media #{$medium-up} {
      font-size: $h1-font-size;
    }
  }
  small {
    font-size: 60%;
  }
}
.identity-row {
  .strapline {
    @media #{$small-only} { margin-top: rem-calc(2); }
    @media #{$medium-only} { margin-top: rem-calc(12); }
    @media #{$large-only} { margin-top: rem-calc(28); }
    @media #{$medium-up} {
      text-align:right;
      h2 {
        font-size: $h1-font-size - rem-calc(10);
      }
    }
  }
}

.latest-content {
  .latest-screencast {
    margin-top: $header-top-margin*4;
  }
  .latest-article {
    margin-top: $header-top-margin*6;
  }
  .latest-screencast, .latest-article {
    margin-bottom: $header-top-margin*2;
    @media #{$large-up} {
      margin-top: 0;
      margin-bottom: 0;
    }
  }
}

.why-am-i-here .strapline {
  @media #{$large-up} {
    margin-top: $header-top-margin*9;
  }
}

.training-signpost {
  margin-bottom: $header-bottom-margin*4;
}


.publication {
  margin-bottom: $header-bottom-margin*8;
  .description {
    margin-bottom: $header-bottom-margin*4;
  }
}

.testimonial {
  font-family: Garamond, Georgia, serif;
  &, & p {
    color: $body-font-color;
    font-style: italic;
    strong { font-style: normal; }
  }
}
.standout {
  margin-top: 2em;
  margin-bottom: 2em;
  blockquote {

  font-family: Garamond, Georgia, serif;
  font-size: $h5-font-size;
  @media #{$medium-up} {
    font-size: $h4-font-size;
  }
  // &, & p {
  //   color: $body-font-color;
  // }
}
}

.training-leadtext {
  margin-bottom: 1em;
}

.passport {
  border: 1px solid black;
  background-color: white;	
  padding: 5px;
  width: 212px;
}
ul.spaced li {
  margin-bottom: $header-bottom-margin;
}
ul.veryspaced li {
  margin-bottom: $paragraph-margin-bottom;
}
.howitworks {
  margin-top: $header-bottom-margin * 6;
}
h4.call-to-action {
  margin-bottom: $header-bottom-margin * 3;
}
.upsell-private-class {
  margin-top: $header-bottom-margin * 6;
}

.buy-course-now {
  margin-bottom: 0;
}
